package cn.com.lsy.product.lepao.model.entities;

import cn.com.lsy.product.lepao.common.Constant;
import cn.com.lsy.product.lepao.util.CommonFunctionUtil;

import java.text.ParseException;
import java.util.Date;

public class LpUserInfoTbl {
    private Integer id;

    private String username;

    private String password;

    private String realName;

    private String phone;

    private String remark;

    private Integer parentId;

    private Date lastLogin;

    private String lastIpAddress;

    private Integer thumbnail;

    private String devId;

    private String token;

    private Date insertTime;

    private String sex;

    private String nickname;

    private String loginType;

    private String status;

    private String birthday;

    private Integer height;

    private Integer weight;

    private String headerUrl;

    private String ext;

    public static LpUserInfoTbl creatUser(String lastIpAddress, String devId, String nickname) throws ParseException, ParseException {
        LpUserInfoTbl user = new LpUserInfoTbl();
        user.setLastLogin(CommonFunctionUtil.getDateTime(Constant.formatType.second));
        user.setInsertTime(CommonFunctionUtil.getDateTime(Constant.formatType.second));
        user.setLastIpAddress(lastIpAddress);
        user.setToken(CommonFunctionUtil.createUuid());
        user.setDevId(devId);
        user.setNickname(nickname);
        //user.setThumbnail(accessoryTbl.getId());
        return user;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Date getLastLogin() {
        return lastLogin;
    }

    public void setLastLogin(Date lastLogin) {
        this.lastLogin = lastLogin;
    }

    public String getLastIpAddress() {
        return lastIpAddress;
    }

    public void setLastIpAddress(String lastIpAddress) {
        this.lastIpAddress = lastIpAddress;
    }

    public Integer getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(Integer thumbnail) {
        this.thumbnail = thumbnail;
    }

    public String getDevId() {
        return devId;
    }

    public void setDevId(String devId) {
        this.devId = devId;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public Date getInsertTime() {
        return insertTime;
    }

    public void setInsertTime(Date insertTime) {
        this.insertTime = insertTime;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getLoginType() {
        return loginType;
    }

    public void setLoginType(String loginType) {
        this.loginType = loginType;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public Integer getHeight() {
        return height;
    }

    public void setHeight(Integer height) {
        this.height = height;
    }

    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public String getHeaderUrl() {
        return headerUrl;
    }

    public void setHeaderUrl(String headerUrl) {
        this.headerUrl = headerUrl;
    }

    public String getExt() {
        return ext;
    }

    public void setExt(String ext) {
        this.ext = ext;
    }
}